#!/bin/bash


EXPECTED_ARGS=0
exName=prova.elf

if [ $# = $EXPECTED_ARGS ]
  then
  echo -e "\n\t compiling code and linking with stripper library..."
    g++ -Wall -g3 main.cc -o $exName -lstripper
  echo -e "\t done. The executable is \"$exName\"; run it as: \"./$exName\"\n\n"

else
  echo -e "\n\tERROR: no argument expected. This will trigger cleaning..."
  if [ -f "./$exName" ]
    then
    rm -rf $exName
    echo -e "\t cleaning done\n"
  else
    echo -e "\t nothing to be cleaned.\n"
  fi

fi
